// components/order/order-goods-item/index.js
const componentBehaviors = require('../../../../behaviors/component');
import { COMPONENT_OPTIONS } from '../../../../constants/common';

Component({
    behaviors: [componentBehaviors],
    options: {
        ...COMPONENT_OPTIONS,
    },
    properties: {
        itemInfo: {
            type: Object,
            value: {},
        },
        isHaveAfterSaleButton: {
            type: Boolean,
            value: false,
        },
        // 是否显示金额
        isShowPrice: {
            type: Boolean,
            value: true,
        },
        // 金额前缀
        pricePrefix: {
            type: String,
            value: '',
        },
    },
    methods: {
        // 售后事件
        afterSaleAction: function () {
            this.triggerEvent('afterSale', this.data.itemInfo);
        },
    }
})
